#pragma once

#include <map>
#include "memory_allocator.hpp"
#include "ned_pool.hpp"

namespace cpac
{

	// Custom map template.
	//--------------------------------------
	// Usage is cpac::map<int, int>::type int_map;
	// This container specifies a default allocator for us, but we could of course
	// pass it another one if we need to.
	template
		<
			typename _Key, 
			typename _Type, 
			class    _Compare = std::less< _Key >, 
            typename _Allocator = cpac::allocator_stl< std::pair< _Key, _Type >, cpac::ned_pooling_policy > 
		> 
	struct map 
	{
		typedef std::map< _Key, _Type, _Compare, _Allocator > type;
	};
	//--------------------------------------

	// Custom multimap template.
	//--------------------------------------
	// Usage is cpac::multimap<int, int>::type int_multimap;
	// This container specifies a default allocator for us, but we could of course
	// pass it another one if we need to.
	template
		<
			typename _Key, 
			typename _Type, 
			class    _Compare = std::less< _Key >, 
            typename _Allocator = cpac::allocator_stl< std::pair< _Key, _Type >, cpac::ned_pooling_policy > 
		> 
	struct multimap 
	{
		typedef std::multimap< _Key, _Type, _Compare, _Allocator > type;
	};
	//--------------------------------------
}
